<template>
  <div>
    <div>账号切换</div>
    <button @click="zhangsan()" type="default" size="mini">张三主管</button>
    <button @click="wjl()" type="default" size="mini">王经理</button>
    <button @click="lrsjl()" type="default" size="mini">李人事经理</button>
    <button @click="zzjl()" type="default" size="mini">admin</button>
    <button @click="lisi()" type="default" size="mini">李四</button>
    <div>当前token：{{ token }}</div>
  </div>
</template>

<script>
export default {
  name: "Test",

  data() {
    return {
      token: ''
    };
  },

  created(){
    this.token = window.localStorage.getItem('token')
  },

  methods: {
    zhangsan() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDcwMjQyMTQ20FEqLU4t8kxRsjKHMPMSc1OBWqoyEvPSixPzlGoBPwik1kUAAAA.OU1R9_aHcAP_Zvg_1A5yP5rQ_Ex2f_9URlcW1xQeJ-1KhzUGfIg72U7Ur7vXyN948trTLB2c_C8ntOhJChDs_Q'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },
    wjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDcwMrQwNDcx1lEqLU4t8kxRsjKCMPMSc1OBWsqzcnKUagGUqfspQQAAAA.p-bXhGbl7HSeWNC3lqC4tONz1NK8IOIntxpnPcJNFaDp6jx0iJibroroSESb5ovyfAE_8L0zVTJSlDuQY4Uhdw'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    lrsjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDcwMrQwNLc00lEqLU4t8kxRsjKGMPMSc1OBWnKKirNylGoBNmyA7kIAAAA.Dpo1zSiXZrL3QNxs3fVOkk0aI0asckNXjRE8F-H8PQNfuK9eAroieCZFQmL9sWhydMi7rpCjhhgzLRDRglb_XQ'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    zzjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDcwNLUwNDI01FEqLU4t8kwBikGYeYm5qUAtiSm5mXlKtQA-dTdAQgAAAA.a6WzMFaVOavHNLpS7cFt7qWDJL78VRnc9PAGR0wEe9jPTFzolsiuDEU7DfBCwTbKsi0ta1lROFrI8nwvQnaCgQ'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    lisi() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDcwMjQ2NLA01FEqLU4t8kxRsjKBMPMSc1OBWnIyizOVagFYrhgyQQAAAA.OOEpZ17Aki3pizTLf3YXDlFXU8vVAUzskxykbSCnRE6E7oS6iLneeSnGYMSPUOJFtf8fl9fyCawWxixf8-wYAw'
      
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    }
  }
}
</script>
